package Service.ServiceImpl;

import Dao.DaoImpl.DormDaoImpl;
import Dao.DormDao;
import Service.DormService;
import domain.Dorm;

import java.util.HashMap;
import java.util.List;

public class DormServiceImpl implements DormService {
    private DormDao dao = new DormDaoImpl();

    @Override
    public void addDorm(Dorm dorm) {
        dao.addDorm(dorm);
    }

    @Override
    public List<Dorm> fuzzySelectDorm(HashMap<String, String> map) {
        return dao.fuzzySelectDorm(map);
    }

    @Override
    public List<Dorm> dormList() {
        return dao.dormList();
    }

    @Override
    public Dorm selectDormByDormnum(String dormnum) {
        return dao.selectDormByDormnum(dormnum);
    }

    @Override
    public void updateDorm(Dorm dorm) {
        dao.updateDorm(dorm);
    }

    @Override
    public void deleteDorm(String dormnum) {
        dao.deleteDorm(dormnum);
    }

    @Override
    public void payWater(Double money, String dormnum) {
        dao.payWater(money,dormnum);
    }

    @Override
    public void payEle(Double money, String dormnum) {
        dao.payEle(money,dormnum);
    }




}
